<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>KeyboardEvent.key</title>
  <link type="text/css" rel="stylesheet" href="style.css">
  <script src="main.js" type="test/js"></script>
  <script defer>
(function(){
var hexscript=document.querySelectorAll('script[type="hex/js"]')
var i
for(i=0;i<hexscript.length;i++)
try{
eval(hexscript[i].innerHTML)
}
catch(err){document.body.innerHTML+="<br>"+err;console.log(err)}
}
var testscript=document.querySelectorAll('script[type="test/js"]')
for(i=0;i<testscript.length;i++){
try{
eval(testscript[i].innerHTML)
}
catch(err){document.body.innerHTML+="<br>"+err;console.log(err)}
}
})()
</script>
</head>

<body>
  <div class="">
    <textarea rows="5" id="test-target"></textarea>
    <button id="btn-clear-console">清空控制台</button>
  </div>
  <div class="">
    <div id="console-log"></div>
  </div>
</body>
</html>
